package com.jess.arms.cj;

/**
 * @Title: ApiException
 * @Package com.chinamall21.mobile.common.api.exception
 * @Description: Api请求异常信息
 * @author: 赵志军
 * @date: 16/5/24 上午10:52
 */
public class ApiException extends Exception {
    private String errorCode;
    private String errorInfo;

    public ApiException(String errorCode, String errorInfo) {
        this.errorCode = errorCode;
        this.errorInfo = errorInfo;
    }

    public String getErrorCode() {
        if (errorCode != null) {
            return errorCode;
        } else {
            return ErrorCode.OTHER_ERROR;
        }
    }

    public String getErrorInfo() {
        return errorInfo;
    }
}
